   <div class="content">
        <div class="header">


            <h1 class="page-title">用户管理</h1>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">

<script type="text/javascript"> 
  $(document).ready(function() {  
        $.post("/userctr/userlist", 
            function(data,status) { 
              $('#tbcontent').html(data);   
          })  
  }); 

   function perSubmit() {
        var d=$("#form1").serialize();
        $.post("/userctr/useradd", d, function (result) { 
            $.post("/userctr/userlist", 
                function(data,status) { 
                  $('#tbcontent').html(data);   
              })  
        }, "text");
    }

</script> 

<div class="row-fluid">
                    
<div class="btn-toolbar">
    <a class="btn btn-primary" href="#myModal" role="button" data-toggle="modal"><i class="icon-plus"></i> 添加用户</a>
  <div class="btn-group">
  </div>
</div>
<div class="well">
    <table class="table">
      <thead>
        <tr>
          <th>用户名</th>
          <th>是否管理员</th>
          <th style="width: 40px;"></th>
        </tr>
      </thead>
      <tbody id="tbcontent">
        <p id="abc"></p>
      <!--
        {{range .Users}}
        <tr>
          <td>{{.UserName}}</td>
          <td>{{.Ifadmin}}</td>
          <td>
              <a href="/userctr/edituser/{{.Id}}"><i class="icon-pencil"></i></a>
              <a href="/userctr/deluser/{{.Id}}" role="button" data-toggle="modal"><i class="icon-remove"></i></a>
          </td>
        </tr>
        {{end}}-->

      </tbody>
    </table>
</div>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">添加用户</h3>
  </div>
  <div class="modal-body">
    <form class="form-horizontal" id="form1" name="form1" method="post" action="/userctr/useradd">
      <div class="control-group">
        <label class="control-label" for="username">用户名</label>
        <div class="controls">
          <input type="text" id="username" name="username" placeholder="用户名">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="password">密码</label>
        <div class="controls">
          <input type="password" id="password" name="password" placeholder="密码">
        </div>
      </div>
      <div class="control-group">
        <div class="controls">
          <label class="checkbox">
            <input type="checkbox" id="ifadmin" name="ifadmin"> 是否管理员
          </label>
        </div>
      </div>
    </form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" id="submitbtn" onclick="perSubmit()">提交</button>
  </div>
</div>

<!--
<div class="pagination">
    <ul>
        <li class="active"><a href="#">上一页</a></li>
        <li><a href="/admin/index?page=1">1</a></li>
        <li><a href="#">2</a></li>
        <li><a href="#">下一页</a></li>
    </ul>
</div>

-->